package org.activequant.data.retrieval;
import org.activequant.core.domainmodel.marketscanner.MarketScanSeriesSpecification;
import org.activequant.core.domainmodel.marketscanner.ScanDataEntity;
/**
 * Generic interface for historical data retrieval.<br/>
 * IScanSeriesDataIteratorSource&lt;T extends ScanDataEntity&lt;T&gt;&gt; is an interface. Defines the method:
 * <ul>
 * <li>Iterable&lt;T&gt; fetch(MarketScanSeriesSpecification seriesSpecification) throws Exception;</li>
 * </ul>
 *  @author Dimitar Misev
 *
 */
public interface IScanSeriesDataIteratorSource<T extends ScanDataEntity<T>> {

	/**
	 * Returns iterator over the series of the market events.
	 * Iterator is always in time order (from oldest, to more recent).
	 * 
	 * @param seriesSpecification describes instrument, and (optionally)
	 * 			start/end dates and time frame (if applicable).
	 * 
	 * @return iterable object.
	 * 
	 * @throws Exception
	 */
	Iterable<T> fetch(MarketScanSeriesSpecification seriesSpecification) throws Exception;
}
